<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>InterpréteurAP6:  Fichier source de Arbre.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Généré par Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">InterpréteurAP6</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Arbre.h</div>  </div>
</div>
<div class="contents">
<a href="Arbre_8h.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Contient toutes les spécifications de classes nécessaires</span>
<a name="l00002"></a>00002 <span class="comment">// pour représenter l&#39;arbre abstrait</span>
<a name="l00003"></a>00003 <span class="preprocessor">#ifndef ARBRE_H_</span>
<a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#define ARBRE_H_</span>
<a name="l00005"></a>00005 <span class="preprocessor"></span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;iomanip&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="Exception_8h.html">Exception.h</a>&quot;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="keyword">using namespace </span>std;
<a name="l00012"></a>00012 
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="Symbole_8h.html">Symbole.h</a>&quot;</span>
<a name="l00014"></a>00014 
<a name="l00016"></a>00016 
<a name="l00018"></a>00018 
<a name="l00019"></a><a class="code" href="classNoeud.html">00019</a> <span class="keyword">class </span><a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00020"></a>00020     <span class="comment">// classe abstraite dont dériveront toutes les classes servant à représenter l&#39;arbre abstrait</span>
<a name="l00021"></a>00021     <span class="comment">// Remarque : la classe ne contient aucun constructeur</span>
<a name="l00022"></a>00022 <span class="keyword">public</span>:
<a name="l00023"></a>00023     <span class="keyword">virtual</span> <span class="keywordtype">int</span> getValeur() = 0; <span class="comment">// méthode pure (non implémentée) qui rend la classe abstraite</span>
<a name="l00024"></a>00024 
<a name="l00025"></a><a class="code" href="classNoeud.html#ab08493f1bca060b33adf86e93a975533">00025</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classNoeud.html#ab08493f1bca060b33adf86e93a975533">afficher</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0) {
<a name="l00026"></a>00026         cout &lt;&lt; setw(4 * indentation) &lt;&lt; <span class="stringliteral">&quot; &quot;</span>;
<a name="l00027"></a>00027     }
<a name="l00028"></a>00028     <span class="comment">// pour afficher un noeud avec un décalage (indentation) proportionnel à son niveau dans l&#39;arbre</span>
<a name="l00029"></a>00029 
<a name="l00030"></a><a class="code" href="classNoeud.html#ab3dee921bc7286611ed7f06d3430d6c9">00030</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classNoeud.html#ab3dee921bc7286611ed7f06d3430d6c9">afficherEnC</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0) {
<a name="l00031"></a>00031             indentation = indentation;
<a name="l00032"></a>00032     } <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00033"></a>00033 
<a name="l00034"></a><a class="code" href="classNoeud.html#afde029cd93b16aaa7d1cddb82d170db9">00034</a>     <span class="keyword">virtual</span> <a class="code" href="classNoeud.html#afde029cd93b16aaa7d1cddb82d170db9">~Noeud</a>() {
<a name="l00035"></a>00035     } <span class="comment">// présence d&#39;un destructeur virtuel conseillée dans les classes abstraites</span>
<a name="l00036"></a>00036 };
<a name="l00037"></a>00037 
<a name="l00039"></a>00039 
<a name="l00040"></a><a class="code" href="classNoeudSeqInst.html">00040</a> <span class="keyword">class </span><a class="code" href="classNoeudSeqInst.html">NoeudSeqInst</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00041"></a>00041     <span class="comment">// classe pour représenter un noeud &quot;sequence d&#39;instruction&quot;</span>
<a name="l00042"></a>00042     <span class="comment">// qui a autant de fils que d&#39;instructions dans la séquence</span>
<a name="l00043"></a>00043 <span class="keyword">public</span>:
<a name="l00044"></a>00044     <a class="code" href="classNoeudSeqInst.html">NoeudSeqInst</a>(); <span class="comment">// construit une séquence d&#39;instruction vide</span>
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="classNoeudSeqInst.html#a9e83d47f44756141a71e4102cd23549a">00046</a>     <a class="code" href="classNoeudSeqInst.html#a9e83d47f44756141a71e4102cd23549a">~NoeudSeqInst</a>() {
<a name="l00047"></a>00047     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00048"></a>00048     <span class="keywordtype">int</span> getValeur(); <span class="comment">// évalue chaque instruction de la séquence</span>
<a name="l00049"></a>00049     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la séquence d&#39;instructions</span>
<a name="l00050"></a>00050     <span class="keywordtype">void</span> ajouteInstruction(<a class="code" href="classNoeud.html">Noeud</a>* instruction); <span class="comment">// ajoute une instruction à la séquence</span>
<a name="l00051"></a>00051     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0);
<a name="l00052"></a>00052 <span class="keyword">private</span>:
<a name="l00053"></a>00053     vector&lt;Noeud *&gt; tabInst; <span class="comment">// pour stocker les instructions de la séquence</span>
<a name="l00054"></a>00054 };
<a name="l00055"></a>00055 
<a name="l00057"></a>00057 
<a name="l00058"></a><a class="code" href="classNoeudAffectation.html">00058</a> <span class="keyword">class </span><a class="code" href="classNoeudAffectation.html">NoeudAffectation</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00059"></a>00059     <span class="comment">// classe pour représenter un noeud &quot;affectation&quot;</span>
<a name="l00060"></a>00060     <span class="comment">// composé de 2 fils : la variable et l&#39;expression qu&#39;on lui affecte</span>
<a name="l00061"></a>00061 <span class="keyword">public</span>:
<a name="l00062"></a>00062     <a class="code" href="classNoeudAffectation.html">NoeudAffectation</a>(<a class="code" href="classNoeud.html">Noeud</a>* variable, <a class="code" href="classNoeud.html">Noeud</a>* expression); <span class="comment">// construit une affectation</span>
<a name="l00063"></a>00063 
<a name="l00064"></a><a class="code" href="classNoeudAffectation.html#adbf0947fb09f7ae28d9b57736ec50afc">00064</a>     <a class="code" href="classNoeudAffectation.html#adbf0947fb09f7ae28d9b57736ec50afc">~NoeudAffectation</a>() {
<a name="l00065"></a>00065     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00066"></a>00066     <span class="keywordtype">int</span> getValeur(); <span class="comment">// évalue l&#39;expression et affecte sa valeur à la variable</span>
<a name="l00067"></a>00067     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;affectation</span>
<a name="l00068"></a>00068     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00069"></a>00069 <span class="keyword">private</span>:
<a name="l00070"></a>00070     <a class="code" href="classNoeud.html">Noeud</a>* variable;
<a name="l00071"></a>00071     <a class="code" href="classNoeud.html">Noeud</a>* expression;
<a name="l00072"></a>00072 };
<a name="l00073"></a>00073 
<a name="l00075"></a>00075 
<a name="l00076"></a><a class="code" href="classNoeudOperateurBinaire.html">00076</a> <span class="keyword">class </span><a class="code" href="classNoeudOperateurBinaire.html">NoeudOperateurBinaire</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00077"></a>00077     <span class="comment">// classe pour représenter un noeud &quot;opération arithmétique&quot; composé d&#39;un opérateur (+-*/)</span>
<a name="l00078"></a>00078     <span class="comment">// et de 2 fils : l&#39;opérande gauche et l&#39;opérande droit</span>
<a name="l00079"></a>00079 <span class="keyword">public</span>:
<a name="l00080"></a>00080     <a class="code" href="classNoeudOperateurBinaire.html">NoeudOperateurBinaire</a>(<a class="code" href="classSymbole.html">Symbole</a> operateur, <a class="code" href="classNoeud.html">Noeud</a>* operandeGauche, <a class="code" href="classNoeud.html">Noeud</a>* operandeDroit);
<a name="l00081"></a>00081     <span class="comment">// construit une opération binaire : operandeGauche operateur OperandeDroit</span>
<a name="l00082"></a>00082 
<a name="l00083"></a><a class="code" href="classNoeudOperateurBinaire.html#a4a0c3487efa1dfa47538e40888b63f92">00083</a>     <a class="code" href="classNoeudOperateurBinaire.html#a4a0c3487efa1dfa47538e40888b63f92">~NoeudOperateurBinaire</a>() {
<a name="l00084"></a>00084     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00085"></a>00085     <span class="keywordtype">int</span> getValeur(); <span class="comment">// évalue l&#39;operande gauche, l&#39;operande droit et applique l&#39;opérateur</span>
<a name="l00086"></a>00086 
<a name="l00087"></a><a class="code" href="classNoeudOperateurBinaire.html#a903457a1927eadf9181c64fca99dc867">00087</a>     <a class="code" href="classNoeud.html">Noeud</a>* <a class="code" href="classNoeudOperateurBinaire.html#a903457a1927eadf9181c64fca99dc867">getOpGauche</a>() {
<a name="l00088"></a>00088         <span class="keywordflow">return</span> operandeGauche;
<a name="l00089"></a>00089     };
<a name="l00090"></a>00090 
<a name="l00091"></a><a class="code" href="classNoeudOperateurBinaire.html#a69cae95a6d88872083d9089985f0e761">00091</a>     <a class="code" href="classNoeud.html">Noeud</a>* <a class="code" href="classNoeudOperateurBinaire.html#a69cae95a6d88872083d9089985f0e761">getOpDroit</a>() {
<a name="l00092"></a>00092         <span class="keywordflow">return</span> operandeDroit;
<a name="l00093"></a>00093     };
<a name="l00094"></a>00094     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00095"></a>00095     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00096"></a>00096 <span class="keyword">private</span>:
<a name="l00097"></a>00097     <a class="code" href="classSymbole.html">Symbole</a> operateur;
<a name="l00098"></a>00098     <a class="code" href="classNoeud.html">Noeud</a>* operandeGauche;
<a name="l00099"></a>00099     <a class="code" href="classNoeud.html">Noeud</a>* operandeDroit;
<a name="l00100"></a>00100 };
<a name="l00101"></a>00101 
<a name="l00103"></a>00103 
<a name="l00104"></a><a class="code" href="classNoeudInstSi.html">00104</a> <span class="keyword">class </span><a class="code" href="classNoeudInstSi.html">NoeudInstSi</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00105"></a>00105     <span class="comment">// classe pour représenter un noeud &quot;instruction si&quot; composé de la séquence suivante :</span>
<a name="l00106"></a>00106     <span class="comment">//    si (&lt;expBool&gt;) &lt;seqInst&gt; { sinonsi (&lt;expBool&gt;) &lt;seqInst&gt; } [ sinon &lt;seqInst&gt; ] finsi</span>
<a name="l00107"></a>00107 <span class="keyword">public</span>:
<a name="l00108"></a>00108     <a class="code" href="classNoeudInstSi.html">NoeudInstSi</a>(<a class="code" href="classNoeud.html">Noeud</a>* expBool, <a class="code" href="classNoeud.html">Noeud</a>* seqInst, <a class="code" href="classNoeud.html">Noeud</a>* sinon);
<a name="l00109"></a>00109     <span class="comment">// construit une instruction si : expBool seqInst sinon</span>
<a name="l00110"></a>00110 
<a name="l00111"></a><a class="code" href="classNoeudInstSi.html#af61dc5e40904a464c4b08d24abb3aeac">00111</a>     <a class="code" href="classNoeudInstSi.html#af61dc5e40904a464c4b08d24abb3aeac">~NoeudInstSi</a>() {
<a name="l00112"></a>00112     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00113"></a>00113     <span class="keywordtype">int</span> getValeur();
<a name="l00114"></a>00114     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00115"></a>00115     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00116"></a>00116     <span class="keywordtype">void</span> setSinon(<a class="code" href="classNoeud.html">Noeud</a>* sinon); <span class="comment">// l&#39;attribut sinon prend pour valeur sinon</span>
<a name="l00117"></a>00117     <a class="code" href="classNoeud.html">Noeud</a>* getSinon(); <span class="comment">// retourne le pointeur sinon</span>
<a name="l00118"></a>00118     <a class="code" href="classNoeud.html">Noeud</a>* getExp(); <span class="comment">//retourne l&#39;expression booléenne du premier si</span>
<a name="l00119"></a>00119     <a class="code" href="classNoeud.html">Noeud</a>* getSeq(); <span class="comment">//retourne l&#39;expression booléenne du premier si</span>
<a name="l00120"></a>00120 <span class="keyword">private</span>:
<a name="l00121"></a>00121     <a class="code" href="classNoeud.html">Noeud</a>* expBool;
<a name="l00122"></a>00122     <a class="code" href="classNoeud.html">Noeud</a>* seqInst;
<a name="l00123"></a>00123     <a class="code" href="classNoeud.html">Noeud</a>* sinon;
<a name="l00124"></a>00124 };
<a name="l00125"></a>00125 
<a name="l00127"></a>00127 
<a name="l00128"></a><a class="code" href="classNoeudBoucle.html">00128</a> <span class="keyword">class </span><a class="code" href="classNoeudBoucle.html">NoeudBoucle</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00129"></a>00129     <span class="comment">//Classe pour représenter un noeud &quot;boucle&quot;</span>
<a name="l00130"></a>00130 <span class="keyword">public</span>:
<a name="l00131"></a>00131     <a class="code" href="classNoeudBoucle.html">NoeudBoucle</a>(<a class="code" href="classNoeud.html">Noeud</a>* expBool, <a class="code" href="classNoeud.html">Noeud</a>* seqInst);
<a name="l00132"></a>00132     <span class="comment">// construit une instruction boucle.</span>
<a name="l00133"></a>00133 
<a name="l00134"></a><a class="code" href="classNoeudBoucle.html#a60f9b57534858d19f64c9499a6b8dfa9">00134</a>     <a class="code" href="classNoeudBoucle.html#a60f9b57534858d19f64c9499a6b8dfa9">~NoeudBoucle</a>() {
<a name="l00135"></a>00135     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00136"></a>00136 <span class="keyword">protected</span>:
<a name="l00137"></a><a class="code" href="classNoeudBoucle.html#ab1c27207447eab3f4191c9b8dd2447fe">00137</a>     <a class="code" href="classNoeud.html">Noeud</a>* <a class="code" href="classNoeudBoucle.html#ab1c27207447eab3f4191c9b8dd2447fe">expBool</a>;
<a name="l00138"></a><a class="code" href="classNoeudBoucle.html#a06142558bd57fbd4173890cf52ec5215">00138</a>     <a class="code" href="classNoeud.html">Noeud</a>* <a class="code" href="classNoeudBoucle.html#a06142558bd57fbd4173890cf52ec5215">seqInst</a>;
<a name="l00139"></a>00139 };
<a name="l00140"></a>00140 
<a name="l00142"></a>00142 
<a name="l00143"></a><a class="code" href="classNoeudInstTq.html">00143</a> <span class="keyword">class </span><a class="code" href="classNoeudInstTq.html">NoeudInstTq</a> : <span class="keyword">public</span> <a class="code" href="classNoeudBoucle.html">NoeudBoucle</a> {
<a name="l00144"></a>00144     <span class="comment">//Classe pour représenter un noeud &quot;Tanque&quot; composé de la séquence suivante :</span>
<a name="l00145"></a>00145     <span class="comment">//&lt;instTq&gt; ::= tantque (&lt;expBool&gt;) &lt;seqInst&gt; fintantque</span>
<a name="l00146"></a>00146 <span class="keyword">public</span>:
<a name="l00147"></a>00147     <a class="code" href="classNoeudInstTq.html">NoeudInstTq</a>(<a class="code" href="classNoeud.html">Noeud</a>* expBool, <a class="code" href="classNoeud.html">Noeud</a>* seqInst);
<a name="l00148"></a>00148     <span class="comment">// construit une instruction tant que.</span>
<a name="l00149"></a>00149 
<a name="l00150"></a><a class="code" href="classNoeudInstTq.html#ac08d7eec9c8cfe150a02e23f1a6ade64">00150</a>     <a class="code" href="classNoeudInstTq.html#ac08d7eec9c8cfe150a02e23f1a6ade64">~NoeudInstTq</a>() {
<a name="l00151"></a>00151     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00152"></a>00152     <span class="keywordtype">int</span> getValeur();
<a name="l00153"></a>00153     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00154"></a>00154     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00155"></a>00155 };
<a name="l00156"></a>00156 
<a name="l00158"></a>00158 
<a name="l00159"></a><a class="code" href="classNoeudInstRepeter.html">00159</a> <span class="keyword">class </span><a class="code" href="classNoeudInstRepeter.html">NoeudInstRepeter</a> : <span class="keyword">public</span> <a class="code" href="classNoeudBoucle.html">NoeudBoucle</a> {
<a name="l00160"></a>00160     <span class="comment">//Classe pour représenter un noeud &quot;Repeter&quot; composé de la séquence suivante :</span>
<a name="l00161"></a>00161     <span class="comment">//&lt;instRepeter&gt; ::= repeter &lt;seqInst&gt; jusqua (&lt;expBool&gt;)</span>
<a name="l00162"></a>00162 <span class="keyword">public</span>:
<a name="l00163"></a>00163     <a class="code" href="classNoeudInstRepeter.html">NoeudInstRepeter</a>(<a class="code" href="classNoeud.html">Noeud</a>* expBool, <a class="code" href="classNoeud.html">Noeud</a>* seqInst);
<a name="l00164"></a>00164     <span class="comment">// construit une instruction repeter.</span>
<a name="l00165"></a>00165 
<a name="l00166"></a><a class="code" href="classNoeudInstRepeter.html#ace407ed292191c9209c9eca1b8af600d">00166</a>     <a class="code" href="classNoeudInstRepeter.html#ace407ed292191c9209c9eca1b8af600d">~NoeudInstRepeter</a>() {
<a name="l00167"></a>00167     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00168"></a>00168     <span class="keywordtype">int</span> getValeur();
<a name="l00169"></a>00169     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00170"></a>00170     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00171"></a>00171 };
<a name="l00172"></a>00172 
<a name="l00174"></a>00174 
<a name="l00175"></a><a class="code" href="classNoeudInstPour.html">00175</a> <span class="keyword">class </span><a class="code" href="classNoeudInstPour.html">NoeudInstPour</a> : <span class="keyword">public</span> <a class="code" href="classNoeudBoucle.html">NoeudBoucle</a> {
<a name="l00176"></a>00176     <span class="comment">//Classe pour représenter un noeud &quot;Pour&quot; composé de la séquence suivante :</span>
<a name="l00177"></a>00177     <span class="comment">//&lt;instPour&gt; ::= pour ( &lt;affectation&gt; ; &lt;expBool&gt; ; &lt;affectation&gt;) &lt;seqInst&gt; finpour</span>
<a name="l00178"></a>00178 <span class="keyword">public</span>:
<a name="l00179"></a>00179     <a class="code" href="classNoeudInstPour.html">NoeudInstPour</a>(<a class="code" href="classNoeud.html">Noeud</a>* expBool, <a class="code" href="classNoeud.html">Noeud</a>* seqInst, <a class="code" href="classNoeud.html">Noeud</a>* affectation1, <a class="code" href="classNoeud.html">Noeud</a>* affectation2);
<a name="l00180"></a>00180     <span class="comment">// construit une instruction pour.</span>
<a name="l00181"></a>00181 
<a name="l00182"></a><a class="code" href="classNoeudInstPour.html#a1ec8ac928eb5067056a74aeb754e6aed">00182</a>     <a class="code" href="classNoeudInstPour.html#a1ec8ac928eb5067056a74aeb754e6aed">~NoeudInstPour</a>() {
<a name="l00183"></a>00183     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00184"></a>00184     <span class="keywordtype">int</span> getValeur();
<a name="l00185"></a>00185     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00186"></a>00186     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00187"></a>00187 <span class="keyword">protected</span>:
<a name="l00188"></a><a class="code" href="classNoeudInstPour.html#a6b907557f4385a72237e9a461f26a575">00188</a>     <a class="code" href="classNoeud.html">Noeud</a>* <a class="code" href="classNoeudInstPour.html#a6b907557f4385a72237e9a461f26a575">affectation1</a>;
<a name="l00189"></a><a class="code" href="classNoeudInstPour.html#a5cd103c1113cd7107ec539331898f902">00189</a>     <a class="code" href="classNoeud.html">Noeud</a>* <a class="code" href="classNoeudInstPour.html#a5cd103c1113cd7107ec539331898f902">affectation2</a>;
<a name="l00190"></a>00190 };
<a name="l00191"></a>00191 
<a name="l00193"></a>00193 
<a name="l00194"></a><a class="code" href="classNoeudInstLire.html">00194</a> <span class="keyword">class </span><a class="code" href="classNoeudInstLire.html">NoeudInstLire</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00195"></a>00195     <span class="comment">//Classe pour représenter un noeud &quot;Lire&quot; composé de la séquence suivante :</span>
<a name="l00196"></a>00196     <span class="comment">//&lt;instLire&gt; ::= lire ( &lt;variable&gt; )</span>
<a name="l00197"></a>00197 <span class="keyword">public</span>:
<a name="l00198"></a>00198     <a class="code" href="classNoeudInstLire.html">NoeudInstLire</a>(<a class="code" href="classNoeud.html">Noeud</a>* variable);
<a name="l00199"></a>00199     <span class="comment">// construit une instruction Lire.</span>
<a name="l00200"></a>00200 
<a name="l00201"></a><a class="code" href="classNoeudInstLire.html#a2bf49732dc4d04f26124d7605c2d6cdb">00201</a>     <a class="code" href="classNoeudInstLire.html#a2bf49732dc4d04f26124d7605c2d6cdb">~NoeudInstLire</a>() {
<a name="l00202"></a>00202     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00203"></a>00203     <span class="keywordtype">int</span> getValeur();
<a name="l00204"></a>00204     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00205"></a>00205     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00206"></a>00206 <span class="keyword">private</span>:
<a name="l00207"></a>00207     <a class="code" href="classNoeud.html">Noeud</a>* variable;
<a name="l00208"></a>00208 };
<a name="l00209"></a>00209 
<a name="l00210"></a>00210 
<a name="l00212"></a>00212 
<a name="l00213"></a><a class="code" href="classNoeudInstEcrire.html">00213</a> <span class="keyword">class </span><a class="code" href="classNoeudInstEcrire.html">NoeudInstEcrire</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00214"></a>00214     <span class="comment">//Classe pour représenter un noeud &quot;Ecrire&quot; composé de la séquence suivante :</span>
<a name="l00215"></a>00215     <span class="comment">//&lt;instEcrire&gt; ::= ecrire ( &lt;expression&gt; | &lt;chaine&gt; )</span>
<a name="l00216"></a>00216 <span class="keyword">public</span>:
<a name="l00217"></a>00217     <a class="code" href="classNoeudInstEcrire.html">NoeudInstEcrire</a>(<a class="code" href="classNoeud.html">Noeud</a>* exp);
<a name="l00218"></a>00218     <span class="comment">// construit une instruction Ecrire.</span>
<a name="l00219"></a>00219 
<a name="l00220"></a><a class="code" href="classNoeudInstEcrire.html#aaf7a1d8b4d6b6456007f0b949a1bf67f">00220</a>     <a class="code" href="classNoeudInstEcrire.html#aaf7a1d8b4d6b6456007f0b949a1bf67f">~NoeudInstEcrire</a>() {
<a name="l00221"></a>00221     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00222"></a>00222     <span class="keywordtype">int</span> getValeur();
<a name="l00223"></a>00223     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00224"></a>00224     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00225"></a>00225 <span class="keyword">private</span>:
<a name="l00226"></a>00226     <a class="code" href="classNoeud.html">Noeud</a>* exp;
<a name="l00227"></a>00227 };
<a name="l00228"></a>00228 
<a name="l00230"></a>00230 
<a name="l00231"></a><a class="code" href="classNoeudInstSelon.html">00231</a> <span class="keyword">class </span><a class="code" href="classNoeudInstSelon.html">NoeudInstSelon</a> : <span class="keyword">public</span> <a class="code" href="classNoeud.html">Noeud</a> {
<a name="l00232"></a>00232     <span class="comment">//Classe pour représenter un noeud &quot;Selon&quot; composé de la séquence suivante :</span>
<a name="l00233"></a>00233     <span class="comment">// &lt;instSelon&gt; ::= selon ( &lt;expression&gt; | &lt;CHAINE&gt; ) cas (&lt;expression&gt; | &lt;CHAINE&gt; ) : &lt;seqInst&gt; </span>
<a name="l00234"></a>00234     <span class="comment">// { cas (&lt;expression&gt; | &lt;CHAINE&gt;) : &lt;seqInst&gt; } finselon</span>
<a name="l00235"></a>00235 <span class="keyword">public</span>:
<a name="l00236"></a>00236     <a class="code" href="classNoeudInstSelon.html">NoeudInstSelon</a>(<a class="code" href="classNoeudInstSi.html">NoeudInstSi</a>* instsi);
<a name="l00237"></a>00237     <span class="comment">// construit une instruction selon.</span>
<a name="l00238"></a>00238 
<a name="l00239"></a><a class="code" href="classNoeudInstSelon.html#a31ae32f80ee79512544971972b58cf80">00239</a>     <a class="code" href="classNoeudInstSelon.html#a31ae32f80ee79512544971972b58cf80">~NoeudInstSelon</a>() {
<a name="l00240"></a>00240     } <span class="comment">// à cause du destructeur virtuel de la classe Noeud</span>
<a name="l00241"></a>00241     <span class="keywordtype">int</span> getValeur();
<a name="l00242"></a>00242     <span class="keywordtype">void</span> afficher(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche l&#39;opération</span>
<a name="l00243"></a>00243     <span class="keywordtype">void</span> afficherEnC(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> indentation = 0); <span class="comment">// affiche la traduction du languade en C</span>
<a name="l00244"></a>00244 <span class="keyword">private</span>:
<a name="l00245"></a>00245     <a class="code" href="classNoeudInstSi.html">NoeudInstSi</a>* instsi;
<a name="l00246"></a>00246 };
<a name="l00247"></a>00247 
<a name="l00249"></a>00249 
<a name="l00250"></a>00250 <span class="preprocessor">#endif </span><span class="comment">/* ARBRE_H_ */</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Énumérations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Valeurs énumérées</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Amis</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Généré le Tue Dec 27 2011 03:03:26 pour InterpréteurAP6 par&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
